
import 'leaflet/dist/leaflet.css';
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import AdminRegister from "./pages/AdminRegister";
import AdminLogin from "./pages/AdminLogin";
import AdminDashboard from "./components/Dashboard/AdminDashboard";
import UserLogin from "./pages/UserLogin";
import AddUser from "./components/AddUser";
import UserList from "./components/User/UserList";
import RoleList from "./components/User/RoleList";
import CreateRolelist from "./components/User/CreateRolist";
import AddStore from "./components/store/AddStore";
import StoreView from "./components/store/StoreView";
import Reports from "./pages/Reports";
import ProfitLossReport from "./pages/ProfitLossReport";
import SalesPaymentReport from "./pages/SalesPaymentReport";
import CustomerOrders from "./pages/CustomerOrders";
import Supplierlist from "./components/contact/Supplierlist";
import Customerlist from "./components/contact/Customerlist";
import AddSupplier from "./components/contact/AddSupplier";
import Addcustomer from "./components/contact/AddCustomer/Addcustomer";
import ImportCustomer from "./components/contact/import/ImportCustomer";
import ImportSupplier from "./components/contact/import/ImportSupplier";
import AddItem from "./components/Items/AddItems";
import AddService from "./components/Items/AddServices";
import AddAdvance from "./components/advance/addadvance";
import AdvanceList from "./components/advance/advancelist";
import CustomerCouponsList from "./components/coupens/CustomerCouponsList";
import CouponForm from "./components/coupens/CreateCustomerCoupon";
import DiscountCouponForm from "./components/coupens/CreateCoupon";
import DiscountCouponList from "./components/coupens/CouponsMaster";
import QuotationForm from "./components/Quotation/NewQuotation";
import QuotationList from "./components/Quotation/QuotationList";
import NewPurchase from "./components/purchase/newpurcheas";
import PurchaseList from "./components/purchase/purchaselist";
import PurchaseReturnsList from "./components/purchase/PurchaseReturnsList";
import POS from "./components/Sales/POS";
import AddSale from "./components/Sales/AddSale";
import AddSalesReturn from "./components/Sales/AddSalesReturn";
import SaleList from "./components/Sales/SalesList";
import SalesPayment from "./components/Sales/SalesPayment";
import SalesPaymentList from "./components/Sales/SalesReturnsList";
import AddAccount from "./components/Accounts/AddAccounts";
import AccountList from "./components/Accounts/AccountList";
import MoneyTransferList from "./components/Accounts/MoneyTransferList";
import DepositList from "./components/Accounts/DepositList";
import CashTransactions from "./components/Accounts/CashTransactions";
import AddStockAdjustment from "./components/Stock/AddStockAdjustment";
import AdjustmentList from "./components/Stock/AdjustmentList";
import AddStockTransfer from "./components/Stock/AddStockTransfer";
import TransferList from "./components/Stock/TransferList";
import ExpenseList from "./components/Expenses/ExpensesList";
import AddExpense from "./components/Expenses/AddExpense";
import AddExpenseCategory from "./components/Expenses/AddExpenseCategory";
import ExpenseCategoryList from "./components/Expenses/ExpenseCategoryList";
import SendMessage from "./components/Message/SendMessage";
import MessageTemplatesList from "./components/Message/MessageTemplatesList";
import UnitsList from "./components/Settings/UnitsList";
import PaymentTypesList from "./components/Settings/PaymentTypes";
import ChangePassword from "./components/Settings/ChangePassword";
import Store from "./components/Settings/Store";
import TaxList from "./components/Settings/TaxList";
import SmsApi from "./components/Settings/SmsApi";
import CreateUres from "./components/User/CreateUser";
import ItemList from "./components/Items/Itemlist";
import SubCategoryList from "./components/Items/SubCategoryList";
import AddUpdateServices from "./components/Items/AddUpdateServices";
import AddMoneyTransfer from "./components/Accounts/AddMoneyTransfer";
import AddDeposit from "./components/Accounts/AddDeposit";
import CategoriesList from "./components/Items/CategoriesList";
import BrandsList from "./components/Items/BrandsList";
import BrandForm from "./components/Items/BrandForm";
import VariantAdd from "./components/Items/VariantAdd";
import VariantsList from "./components/Items/VariantsList";
import PrintLabels from "./components/Items/PrintLabels";
import ImportItems from "./components/Items/ImportItems";
import ImportServices from "./components/Items/ImportServices";
import WarehouseForm from "./components/Warehpuse/WarehouseForm";
import PosSettingsForm from "./components/Settings/Sale";
import SystemTab from "./components/store/SystemTab";
import AddTax from "./components/Settings/AddTax";
import AddTaxGroup from "./components/Settings/AddTaxGroup";
import AddUnit from "./components/Settings/AddUnit";
import AddPaymentType from "./components/Settings/AddPaymentType";
import AddCountry from "./components/Places/AddCountry";
import AddState from "./components/Places/AddState";
import CountryList from "./components/Places/CountryList";
import StateList from "./components/Places/StateList";
import AddSubscription from "./components/store/AddSubscription";
import SubscriptionList from "./components/store/SubscriptionList";
import SubSubCategoryList from "./components/Items/SubSubCategoryList";
import ImportEntity from "./components/Items/ImportEntity";
import PurchaseReturn from "./components/purchase/purchasereturn";
import WarehouseList from "./components/Warehpuse/WarehouseList";
import TerminalList from "./components/Terminal/TerminalList";
import CreateTerminal from "./components/Terminal/CreateTerminal";
import ViewSale from "./components/Sales/ViewSale";
import ReceivePayment from "./components/Sales/ReceivePayment";
import POSInvoice from "./components/Sales/POSInvoice";
import SalesReturn from "./components/Sales/SalesReturn";
import ViewPayment from "./components/Sales/ViewPayment";
import AddVanCash from "./components/Accounts/AddVanCash";
import AddBanner from './components/Banners/AddBanner'
import BannersList from './components/Banners/BannersList'
import AddMarketingItems from "./components/Banners/AddMarketingItems";
import MarketingItemsList from "./components/Banners/MarketingItemView";
import AddProduct from "./components/Banners/AddProduct"
import ProductListView from "./components/Banners/ProductListView";
import DeletionRequests from "./components/admin/deletion-requests";
import WarehouseTracker from './components/Warehpuse/WarehouseTracker.jsx';
import AccountLedger from './components/Accounts/AccountLedger.jsx';  

function App() {
  return (
    <Router>
      <Routes>
        <Route path="/admin-register" element={<AdminRegister />} />
        <Route path="/" element={<AdminLogin />} />
        <Route path="/dashboard" element={<AdminDashboard />} />
        <Route path="/user-login" element={<UserLogin />} />
        <Route path="/admin/add/user" element={<AddUser />} />
        <Route path="/admin/user/list" element={<UserList />} />
        <Route path="/admin/role/list" element={<RoleList />} />
        <Route path="/admin/create/list" element={<CreateRolelist />} />
        <Route path="/customer/add" element={<Addcustomer />} />
        <Route path="/customer/view" element={<Customerlist />} />
        <Route path="/supplier/add" element={<AddSupplier />} />
        <Route path="/supplier/view" element={<Supplierlist />} />
        <Route path="/customer/import" element={<ImportCustomer />} />
        <Route path="/supplier/import" element={<ImportSupplier />} />
        <Route path="/items/add" element={<AddItem />} />
        <Route path="/services/add" element={<AddService />} />
        <Route path="/store/add" element={<AddStore />} />
        <Route path="/store/view" element={<StoreView />} />
        <Route path="/reports" element={<Reports />} />
        <Route path="/reports/profit-loss" element={<ProfitLossReport />} />
        <Route path="/reports/sales-payment" element={<SalesPaymentReport />} />
        <Route path="/reports/customer-orders" element={<CustomerOrders />} />
        <Route path="/add-advance" element={<AddAdvance />} />
        <Route path="/advance-list" element={<AdvanceList />} />
        <Route path="/customer-coupen-list" element={<CustomerCouponsList />} />
        <Route path="/create" element={<CouponForm />} />
        <Route path="/create-coupon" element={<DiscountCouponForm />} />
        <Route path="/coupon-master" element={<DiscountCouponList />} />
        <Route path="/newquotation" element={<QuotationForm />} />
        <Route path="/quotation-list" element={<QuotationList />} />
        <Route path="/quotation/edit/:id" element={<QuotationForm />} />
        <Route path="/new-purchase" element={<NewPurchase />} />
        <Route path="/purchase-list" element={<PurchaseList />} />
        <Route path="/purchasereturn-list" element={<PurchaseReturnsList />} />
        <Route path="/pos" element={<POS />} />
        <Route path="/add-sale" element={<AddSale />} />
        <Route path="/sale-list" element={<SaleList />} />
        <Route path="/sales-payment" element={<SalesPayment />} />
        <Route path="/sales-payment-list" element={<SalesPaymentList />} />
        <Route path="/add-account" element={<AddAccount />} />
        <Route path="/account-list" element={<AccountList />} />
        <Route path="/money-transfer-list" element={<MoneyTransferList />} />
        <Route path="/add-money-transfer" element={<AddMoneyTransfer />} />
        <Route path="/add-deposit" element={<AddDeposit />} />
        <Route path="/deposit-list" element={<DepositList />} />
        <Route path="/cash-transactions" element={<CashTransactions />} />
        <Route path="/adjustment-list" element={<AdjustmentList />} />
        <Route path="/transfer-list" element={<TransferList />} />
        <Route path="/expense-list" element={<ExpenseList />} />
        <Route path="/add-expense-category" element={<AddExpenseCategory />} />
        <Route path="/add-expense" element={<AddExpense />} />
        <Route path="/expense-category-list" element={<ExpenseCategoryList />} />
        <Route path="/send-message" element={<SendMessage />} />
        <Route path="/message-templates-list" element={<MessageTemplatesList />} />
        <Route path="/units-list" element={<UnitsList />} />
        <Route path="/payment-types-list" element={<PaymentTypesList />} />
        <Route path="/change-password" element={<ChangePassword />} />
        <Route path="/store" element={<Store />} />
        <Route path="/tax-list" element={<TaxList />} />
        <Route path="/sms-api" element={<SmsApi />} />
        <Route path="/create-user" element={<CreateUres />} />
        <Route path="/item-list" element={<ItemList />} />
        <Route path="/add-update-services" element={<AddUpdateServices />} />
        <Route path="/categories-list" element={<CategoriesList />} />
        <Route path="/subcategories-list" element={<SubCategoryList />} />
        {/* Replaced SubCategoryForm with ImportEntity for editing */}
        <Route path="/subcategories-form" element={<ImportEntity entity="subcategories" />} />
        <Route path="/brands-list" element={<BrandsList />} />
        <Route path="/brand-form" element={<BrandForm />} />
        {/* Replaced CategoriesListform with ImportEntity for editing */}
        <Route path="/categories-list-form" element={<ImportEntity entity="categories" />} />
        <Route path="/variants-list" element={<VariantsList />} />
        <Route path="/variant-add" element={<VariantAdd />} />
        <Route path="/print-labels" element={<PrintLabels />} />
        <Route path="/import-items" element={<ImportItems />} />
        <Route path="/import-services" element={<ImportServices />} />
        <Route path="/warehouse-form" element={<WarehouseForm />} />
        <Route path="/warehouse-list" element={<WarehouseList />} />
        <Route path="/stock-adjustment" element={<AddStockAdjustment />} />
        <Route path="/stock-transfer" element={<AddStockTransfer />} />
        <Route path="/pos-settings" element={<PosSettingsForm />} />
        <Route path="/system-tab" element={<SystemTab />} />
        <Route path="/add-tax" element={<AddTax />} />
        <Route path="/edit-tax/:taxId" element={<AddTax />} />
        <Route path="/add-tax-group" element={<AddTaxGroup />} />
        <Route path="/edit-tax-group/:taxGroupId" element={<AddTaxGroup />} />
        <Route path="/add-unit" element={<AddUnit />} />
        <Route path="/edit-unit/:unitId" element={<AddUnit />} />
        <Route path="/add-payment-type" element={<AddPaymentType />} />
        <Route path="/edit-payment-type/:paymentTypeId" element={<AddPaymentType />} />
        <Route path="/add-country" element={<AddCountry />} />
        <Route path="/edit-country/:countryId" element={<AddCountry />} />
        <Route path="/country-list" element={<CountryList />} />
        <Route path="/add-state" element={<AddState />} />
        <Route path="/edit-state/:stateId" element={<AddState />} />
        <Route path="/add-subscription" element={<AddSubscription />} />
        <Route path="/subscription-list" element={<SubscriptionList />} />
        <Route path="/subscription-list/:storeId" element={<SubscriptionList />} />
        <Route path="/edit-subscription/:id" element={<AddSubscription />} />
        <Route path="/sales-return/add" element={<AddSalesReturn />} />
        <Route path="/sub-subcategory-list" element={<SubSubCategoryList />} />
        {/* Replaced with ImportEntity for editing */}
        <Route path="/sub-subcategories-form" element={<ImportEntity entity="sub-subcategories" />} />
        <Route path="/purchase-return" element={<PurchaseReturn />} />
        <Route path="/categories/import" element={<ImportEntity entity="categories" />} />
        <Route path="/subcategories/import" element={<ImportEntity entity="subcategories" />} />
        <Route path="/sub-subcategories/import" element={<ImportEntity entity="sub-subcategories" />} />
        <Route path="/state-list" element={<StateList />} />
        <Route path="/terminal-list" element={<TerminalList />} />
        <Route path="/create-terminal" element={<CreateTerminal />} />
        <Route path="/view-sale" element={<ViewSale />} />
        <Route path="/receive-payment" element={<ReceivePayment />} />
  <Route path="/pos-invoice/:id" element={<POSInvoice />} />
  <Route path="/sales-return" element={<SalesReturn />} />
  <Route path="/view-payment" element={<ViewPayment />} />
  <Route path="/sales-return/edit/:id" element={<AddSalesReturn />} />
<Route path="/ledger/van-cash/new" element={<AddVanCash />} />
 <Route path="/banners/add" element={<AddBanner />} />
        <Route path="/marketingitem/add" element={<AddMarketingItems />} />
        <Route path="/marketingitem/view" element={<MarketingItemsList />} />
        <Route path="/banners/view" element={<BannersList />} />
        <Route path="/product/add" element={<AddProduct />} />
        <Route path="/product/view" element={<ProductListView />} />
        <Route path="/admin/store/edit" element={<AddStore />} />
        <Route path="/warehouse-tracker" element={<WarehouseTracker />} />
        <Route path="/admin/deletion-requests" element={<DeletionRequests />} />
        <Route path="/accounts/:accountId/ledger" element={<AccountLedger />} />
        <Route
  path="/admin/user/create"
  element={<CreateUres />}
/>

        
      </Routes>
    </Router>
  );
}

export default App;